#ifndef _USART_BUFFER
#define _USART_BUFFER

#include "circle_api.h"

#define USART_BUFFER_SIZE 10

extern u8 buffer[USART_BUFFER_SIZE];
extern u8 head;
extern u8 tail;

u8 bufferEmpty(USART_TypeDef* USARTx);
u8 writeBuffer(USART_TypeDef* USARTx, u8 c);
u8 readBuffer( USART_TypeDef* USARTx );
u8 flushBuffer( USART_TypeDef* USARTx );
tHandler USART1_IRQHandler( void );

#endif // _USART_BUFFER